package service.configuration.xstream;

import service.configuration.IFieldStringConfig;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.converters.basic.IntConverter;

@XStreamAlias("string")
public class FieldStringConfig implements IFieldStringConfig {
	
	@XStreamConverter(value=IntConverter.class)
	private Integer min;
	@XStreamConverter(value=IntConverter.class)
	private Integer max;
	private String regex;
	
	public FieldStringConfig(Integer minchar, Integer maxchar, String regex) {
		this.min = minchar;
		this.max = maxchar;
		this.regex = regex;
	}

	public Integer getMinchar() {
		return min;
	}

	public void setMinchar(Integer minchar) {
		this.min = minchar;
	}

	public Integer getMaxchar() {
		return max;
	}

	public void setMaxchar(Integer maxchar) {
		this.max = maxchar;
	}

	public String getRegex() {
		return regex;
	}

	public void setRegex(String regex) {
		this.regex = regex;
	}
	
	
}
